package cn.lili.modules.promotion.mapper;

import cn.lili.modules.order.order.entity.vo.OrderSimpleVO;
import cn.lili.modules.promotion.entity.dos.TicketOrder;
import cn.lili.modules.promotion.entity.vos.TicketAreaStatisticsVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TicketOrderMapper extends BaseMapper<TicketOrder> {

    @Select("select count(lt.id) as ofSaleCount from li_ticket_order lto " +
            "inner join li_ticket lt on lto.ticket_id = lt.id ${ew.customSqlSegment}")
    Long getTodayStatisticsByArea (@Param(Constants.WRAPPER) Wrapper<TicketOrder> queryWrapper);
}
